/**
 * 
 */
package com.wolfpire.info.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wolfpire.info.dao.SkillsCompetitionInfoDao;
import com.wolfpire.info.model.SkillsCompetitionInfo;
import com.wolfpire.info.service.SkillsCompetitionInfoService;
import com.wolfpire.system.common.Constants;
import com.wolfpire.system.common.Page;
import com.wolfpire.system.common.base.dao.IBaseHibernateDao;
import com.wolfpire.system.common.base.service.impl.BaseHibernateService;

/**
 * @author lihd
 *
 */

@Service("skillsCompetitionInfoService")
public class SkillsCompetitionInfoServiceImpl extends
		BaseHibernateService<SkillsCompetitionInfo, Long> implements
		SkillsCompetitionInfoService {

	@Override
	public List<SkillsCompetitionInfo> list(SkillsCompetitionInfo skillsCompetitionInfo) {
		return this.skillsCompetitionInfoDao.list(skillsCompetitionInfo);
	}

	@Override
	public void del(Long id) {
		SkillsCompetitionInfo skillsCompetitionInfo = this.skillsCompetitionInfoDao.get(id);
		if (null != skillsCompetitionInfo) {
			skillsCompetitionInfo.setDelFlag(Constants.DELETE_FLAG);
			this.skillsCompetitionInfoDao.saveOrUpdate(skillsCompetitionInfo);
		}
	}

	@Override
	public Page<SkillsCompetitionInfo> setPageDataList(
			Page<SkillsCompetitionInfo> page,
			SkillsCompetitionInfo filterSkillsCompetitionInfo) {
		return this.skillsCompetitionInfoDao.findSkillsCompetitionInfos(page, filterSkillsCompetitionInfo);
	}

	@Override
	protected IBaseHibernateDao<SkillsCompetitionInfo, Long> getEntityDao() {
		return this.skillsCompetitionInfoDao;
	}
	
	@Resource private SkillsCompetitionInfoDao skillsCompetitionInfoDao;

}
